// 基于template/src/config/app-view-config.ts.hbs生成
function getAppViewConfig(): any {
	return {
{{#each app.pages as |appView|}}
		"{{appView.codeName}}": {
			"name": "{{appView.name}}",
			"codeName": "{{appView.codeName}}",
			"appEntityCodeName":"{{appView.appEntity.codeName}}",
			"openMode": "{{#if appView.openMode}}{{appView.openMode}}{{else}}INDEXVIEWTAB{{/if}}",
			"redirectView": {{appView.redirectView}},
	{{#if appView.psWorkflow}}
			{{!-- 是否使用工作流代理应用 --}}
			"useWFProxyApp": {{appView.psWorkflow.useWFProxyApp}},
	{{/if}}
	{{#if appView.psAppViewRefs}}
			"viewRefs": {
		{{#each appView.psAppViewRefs as | viewRef |}}
			{{#and viewRef.name viewRef.refPSAppView}}
				"{{viewRef.name}}": "{{viewRef.refPSAppView.codeName}}"{{#unless @last}},{{/unless}}
			{{/and}}
		{{/each}}
			},
	{{/if}}
			"deResParameters": [
  {{#and appView.appEntity appView.appEntity.appDERSPaths}}
    {{#each appView.appEntity.appDERSPaths as | singleResPaths |}}
			{{#each singleResPaths as | resPath |}}
				{ "pathName": "{{lowerCase (pluralize resPath)}}", "parameterName": "{{lowerCase resPath}}" },
			{{/each}}
    {{/each}}
  {{/and}}
      ],
      "parameters": [
	{{#if appView.appEntity}}
				{ "pathName": "{{lowerCase (pluralize appView.appEntity.codeName)}}", "parameterName": "{{lowerCase appView.appEntity.codeName}}" },
	{{/if}}
        { "pathName": "views", "parameterName": "{{lowerCase appView.codeName}}" }
      ],
  {{#if (gt appView.height 0)}}
      "height": {{appView.height}},
  {{/if}}
  {{#if (gt appView.width 0)}}
      "width": {{appView.width}},
  {{/if}}
	{{#if appView.capPSLanguageRes}}
			"captionTag": "{{appView.capPSLanguageRes.lanResTag}}",
	{{/if}}
      "caption": "{{appView.caption}}",
	{{#if appView.psSysImage}}
			"imgPath": "{{appView.psSysImage.imagePath}}",
			"iconCls": "{{appView.psSysImage.cssClass}}",
	{{/if}}
	{{#if appView.psAppViewNavContexts}}
			"navigateContext": {{> @macro/common/navparam.hbs appNavParams=appView.psAppViewNavContexts}},
	{{/if}}
  {{#if appView.psAppViewNavParams}}
			"navigateParams": {{> @macro/common/navparam.hbs appNavParams=appView.psAppViewNavParams}},
	{{/if}}
      "viewType": "{{appView.viewType}}",
    }{{#unless @last}},{{/unless}}
{{/each}}
  }
}

export const AppViewConfig = getAppViewConfig();